<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
    //字面量
    var arr = ["老王","老李","老宋"];
    //得到数组的个数(长度)
//    alert(arr.length); //3
    //给数组的末尾追加一条数据
    alert(arr);
    arr.push("老张");
//    alert(arr.length);  //4
    alert(arr);
</script>